PWD=$(shell pwd)
PORT=$(shell ps -ef | grep uwsgi | grep -v grep | awk '{print $$2}')

install:
	pip install -r requirements.txt

start:
	uwsgi --chdir ./src --http :5000 --wsgi-file app.py --callable app --processes 4 --threads 2

debug:
	export FLASK_APP=./src/app.py &&\
	export FLASK_DEBUG=True &&\
	flask run

destory:
	-kill -9 $(PORT)	
	-nginx -s stop

uwsgi:
	uwsgi uwsgi.ini

nginx:
	nginx -c $(PWD)/nginx.conf

deplay:destory uwsgi nginx
